<?php 

class OpcionesForm extends BaseFormDoctrine
{

	public static $KEY = 'opciones';
	public static $OPC_SEL = 0;
	public static $OPC_AGR = 1;
	
	public function setup()
	{
		$this->widgetSchema[self::$KEY] = new sfWidgetFormSelectRadio(
			array(
				'choices' => array(
					self::$OPC_SEL => 'Seleccionar una pertinencia existente',
					self::$OPC_AGR => 'Agregar una nueva pertinencia'),
				'separator' => '<br>',
				'default' => self::$OPC_SEL
			)
		);

		$this->validatorSchema[self::$KEY] = new sfValidatorChoice(
			array(
				'choices' => array(self::$OPC_SEL, self::$OPC_AGR)
			)
		);

		$this->widgetSchema->setNameFormat('opciones[%s]');

		$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

		$this->setupInheritance();

		parent::setup();
	}

	public function getModelName()
	{
		return 'Tesis';
	}

}
